import Cookies from 'js-cookie'
import setting from './setting'

// 设置token
export const setToken = (token, tokenExpires) => {
    return Cookies.set(setting.cookie.tokenKey, token, { expires: tokenExpires || 1 })
}
// 获取token
export const getToken = () => {
    return Cookies.get(setting.cookie.tokenKey)
}
// 清除token
export const removeToken = () => {
    return Cookies.remove(setting.cookie.tokenKey)
}
